<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <meta content="telephone=no" name="format-detection">
    <title>typeofit.js - Using typeofit.js to get the real JavaScript type of a value.</title>
    <meta name="description" content="typeofit.js - Using typeofit.js to get the real JavaScript type of a value.">
    <link href="css/docs.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <div class="wrap" id="wrap">
      <div class="side">
        <h2 class="subject">TYPEOFIT</h2>
        <h3 class="chanel">Core</h3>
        <ul class="methods">
          <li class="method"><a href="#is">is</a></li>
        </ul>
        <h3 class="chanel">Primitive</h3>
        <ul class="methods">
          <li class="method"><a href="#isBoolean">isBoolean</a></li>
          <li class="method"><a href="#isNull">isNull</a></li>
          <li class="method"><a href="#isNumber">isNumber</a></li>
          <li class="method"><a href="#isString">isString</a></li>
          <li class="method"><a href="#isSymbol">isSymbol</a></li>
          <li class="method"><a href="#isUndefined">isUndefined</a></li>
        </ul>
        <h3 class="chanel">Array && Array Like</h3>
        <ul class="methods">
          <li class="method"><a href="#isArray">isArray</a></li>
          <li class="method"><a href="#isArrayLike">isArrayLike</a></li>
          <li class="method"><a href="#isArguments">isArguments</a></li>
        </ul>
        <h3 class="chanel">ArrayBuffer</h3>
        <ul class="methods">
          <li class="method"><a href="#isArrayBuffer">isArrayBuffer</a></li>
          <li class="method"><a href="#isDataView">isDataView</a></li>
        </ul>
        <h3 class="chanel">HTML Element</h3>
        <ul class="methods">
          <li class="method"><a href="#isElement">isElement</a></li>
          <li class="method"><a href="#isHTMLCollection">isHTMLCollection</a></li>
          <li class="method"><a href="#isXML">isXML</a></li>
          <li class="method"><a href="#isTextNode">isTextNode</a></li>
        </ul>
        <h3 class="chanel">Function</h3>
        <ul class="methods">
          <li class="method"><a href="#isFunction">isFunction</a></li>
          <li class="method"><a href="#isNativeFunction">isNativeFunction</a></li>
          <li class="method"><a href="#isConstructor">isConstructor</a></li>
        </ul>
        <h3 class="chanel">Map</h3>
        <ul class="methods">
          <li class="method"><a href="#isMap">isMap</a></li>
          <li class="method"><a href="#isWeakMap">isWeakMap</a></li>
        </ul>
        <h3 class="chanel">Number</h3>
        <ul class="methods">
          <li class="method"><a href="#isNumeric">isNumeric</a></li>
          <li class="method"><a href="#isEven">isEven</a></li>
          <li class="method"><a href="#isFloat">isFloat</a></li>
          <li class="method"><a href="#isInfinite">isInfinite</a></li>
          <li class="method"><a href="#isInteger">isInteger</a></li>
          <li class="method"><a href="#isOdd">isOdd</a></li>
        </ul>
        <h3 class="chanel">Object</h3>
        <ul class="methods">
          <li class="method"><a href="#isEmptyObject">isEmptyObject</a></li>
          <li class="method"><a href="#isHash">isHash</a></li>
          <li class="method"><a href="#isObject">isObject</a></li>
          <li class="method"><a href="#isPlainObject">isPlainObject</a></li>
        </ul>
        <h3 class="chanel">Set</h3>
        <ul class="methods">
          <li class="method"><a href="#isSet">isSet</a></li>
          <li class="method"><a href="#isWeakSet">isWeakSet</a></li>
        </ul>
        <h3 class="chanel">String</h3>
        <ul class="methods">
          <li class="method"><a href="#isBase64">isBase64</a></li>
          <li class="method"><a href="#isBlank">isBlank</a></li>
          <li class="method"><a href="#isEmpty">isEmpty</a></li>
          <li class="method"><a href="#isHex">isHex</a></li>
          <li class="method"><a href="#isJSON">isJSON</a></li>
        </ul>
        <h3 class="chanel">TypedArray</h3>
        <ul class="methods">
          <li class="method"><a href="#isInt8Array">isInt8Array</a></li>
          <li class="method"><a href="#isUint8Array">isUint8Array</a></li>
          <li class="method"><a href="#isUint8ClampedArray">isUint8ClampedArray</a></li>
          <li class="method"><a href="#isInt16Array">isInt16Array</a></li>
          <li class="method"><a href="#isUint16Array">isUint16Array</a></li>
          <li class="method"><a href="#isInt32Array">isInt32Array</a></li>
          <li class="method"><a href="#isUint32Array">isUint32Array</a></li>
          <li class="method"><a href="#isFloat32Array">isFloat32Array</a></li>
          <li class="method"><a href="#isFloat64Array">isFloat64Array</a></li>
        </ul>
        <h3 class="chanel">Others</h3>
        <ul class="methods">
          <li class="method"><a href="#isDate">isDate</a></li>
          <li class="method"><a href="#isError">isError</a></li>
          <li class="method"><a href="#isRegExp">isRegExp</a></li>
          <li class="method"><a href="#isValue">isValue</a></li>
        </ul>
      </div>
      <div class="main">
        <div class="header" id="header">
          <h1 class="title"><strong class="project">typeofit</strong>.js</h1>
          <p class="tagline">Using typeofit.js to get the real JavaScript type of a value.</p>
        </div>
        <div class="cdn">
          <pre class="code"><code>&lt;script type="text/javascript" src="https://unpkg.com/typeofit@1.9.0/typeofit.min.js"&gt;&lt;/script&gt;</code></pre>
        </div>
        <div class="github"><a class="button" href="https://github.com/yaohaixiao/typeofit/" target="_blank">View on GitHub</a></div>
        <div class="api-md" id="is">
          <div class="api-hd">
            <h2 class="api-title">is ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>is ( val )</code> 方法返回检测数据的数据类型字符串：</p>
            <ul class="api-list">
              <li class="api-li">'array' - 数组</li>
              <li class="api-li">'arraybuffer' - 固定长度的二进制数据缓冲区</li>
              <li class="api-li">'arguments' - （函数的）参数对象</li>
              <li class="api-li">'int8array' - int8array 数组</li>
              <li class="api-li">'uint8array' - uint8array 数组</li>
              <li class="api-li">'uint8clampedarray' - uint8clampedarray 数组</li>
              <li class="api-li">'int16array' - int16array 数组</li>
              <li class="api-li">'uint16array' - uint16array 数组</li>
              <li class="api-li">'int32array' - int32array 数组</li>
              <li class="api-li">'uint32array' - uint32array 数组</li>
              <li class="api-li">'float32array' - float32array 数组</li>
              <li class="api-li">'float64array' - float64array 数组</li>
              <li class="api-li">'boolean' - 布尔值</li>
              <li class="api-li">'map' - Map</li>
              <li class="api-li">'null' - 空值</li>
              <li class="api-li">'undefined' - 未定义</li>
              <li class="api-li">'number' - 数字</li>
              <li class="api-li">'set' - Set</li>
              <li class="api-li">'string' - 字符串</li>
              <li class="api-li">'object' - 对象</li>
              <li class="api-li">'dataview' - DataView 视图</li>
              <li class="api-li">'date' - 日期</li>
              <li class="api-li">'error' - 错误</li>
              <li class="api-li">'collection' - HTML NodeList 对象</li>
              <li class="api-li">'function' - 函数</li>
              <li class="api-li">'element' - HTML 元素节点</li>
              <li class="api-li">'text' - HTML 文本节点</li>
              <li class="api-li">'regexp' - 正则表达式对象</li>
              <li class="api-li">'weakmap' - WeakMap</li>
              <li class="api-li">'weakset' - WeakSet</li>
              <li class="api-li">'whitespace' - 空字符串</li>
            </ul>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">String</dd>
            </dl>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var CustomizeObject;

typeofit.is(null); // -> 'null'
typeofit.is(1); // -> 'number'
typeofit.is('robert'); // -> 'string'
typeofit.is(false); // -> 'boolean'
typeofit.is(CustomizeObject); // -> 'undefined'
typeofit.is(function(){}); // -> 'function'
typeofit.is(new Date()); // -> 'date'
typeofit.is(new Error('THIS IS NEW ERROR')); // -> 'error'
typeofit.is(/s+/g); // -> 'regexp'
typeofit.is({}); // -> 'object'
typeofit.is([1, 2, 3, 4, 5]); // -> 'array'
typeofit.is(Symbol()); // -> 'symbol'

function sum (a, b){
    typeofit.is(arguments);
    return a + b;
}
sum( 5, 6 );

// 请在浏览器环境中测试 DOM 相关数据
typeofit.is(document.getElementById('body')); // -> 'element'
typeofit.is(document.createTextNode('')); // -> 'whitespace'
typeofit.is(document.createTextNode('text')); // -> 'textnode'
typeofit.is(document.getElementsByTagName('script')); // -> 'collection'</code></pre>
          </div>
        </div>
        <div class="api-md" id="isArray">
          <div class="api-hd">
            <h2 class="api-title">isArray ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isArray ( val )</code> 方法用来检测测试数据的数据类型是否为 Array （数组）类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Array 类型返回 true，否则返回 false</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>// True
typeofit.isArray([]); // -> true
typeofit.isArray(new Array()); // -> true
typeofit.isArray('this is string could split it into array'.split(' ')); // -> true

// False
// 虽然 HTMLNodeList 的看起来像数组，但它并不是数组
typeofit.isArray(document.getElementsByTagName('li')); // -> false
// arguments 对象看起来也像数组，但是它也不是数组
function sum (a, b){
    console.log(typeofit.isArray(arguments)); // -> false
    return a + b;
}
sum( 5, 6 );
typeofit.isArray({0:1,1:2}); // -> false
typeofit.isArray( new Int8Array() ); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isArrayLike">
          <div class="api-hd">
            <h2 class="api-title">isArrayLike ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isArrayLike ( val )</code> 方法用来检测测试数据的数据类型是否为类似数组（array、arguments 对象或者 HTMLNodeList 对象）类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 array、arguments 或者 HTMLNodeList 类型返回 true，否则返回 false</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isArrayLike([1, 2, 3, 4, 5]); // -> true

// HTMLNodeList 是类似数组类型的数据
typeofit.isArrayLike(document.getElementsByTagName('li')); // -> true

// arguments 对象也是类似数组类型的数据
function sum(a, b){
    typeofit.isArrayLike(arguments); // -> true
    return a + b;
}
sum(5, 6);

typeofit.isArrayLike( new Int8Array() ); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isArguments">
          <div class="api-hd">
            <h2 class="api-title">isArguments ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isArguments ( val )</code> 方法用来检测测试数据是否为 arguments 对象。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 arguments 类型返回 true，否则返回 false</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isArguments([]); // -> false

function checkArguments(){
    typeofit.isArguments(arguments); // -> true
}
checkArguments();</code></pre>
          </div>
        </div>
        <div class="api-md" id="isArrayBuffer">
          <div class="api-hd">
            <h2 class="api-title">isArrayBuffer ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isArrayBuffer ( val )</code> 方法用来检测测试数据是否为 ArrayBuffer 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 ArrayBuffer 类型返回 true，否则返回 false</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isArrayBuffer([]); // -> false
typeofit.isArrayBuffer(new ArrayBuffer(8)); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isInt8Array">
          <div class="api-hd">
            <h2 class="api-title">isInt8Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isInt8Array ( val )</code>方法用来检测测试数据是否为 Int8Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Int8Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isInt8Array( numbers ); // -> false

function test(){
    typeofit.isInt8Array( arguments );
}
test(); // -> false

typeofit.isInt8Array( new Int8Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isUint8Array">
          <div class="api-hd">
            <h2 class="api-title">isUint8Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isUint8Array ( val )</code>方法用来检测测试数据是否为 Uint8Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Uint8Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isUint8Array( numbers ); // -> false

function test(){
    typeofit.isUint8Array( arguments );
}
test(); // -> false

typeofit.isUint8Array( new Uint8Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isUint8ClampedArray">
          <div class="api-hd">
            <h2 class="api-title">isUint8ClampedArray ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isUint8ClampedArray ( val )</code>方法用来检测测试数据是否为 Uint8ClampedArray 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Uint8ClampedArray 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isUint8ClampedArray( numbers ); // -> false

function test(){
    typeofit.isUint8ClampedArray( arguments );
}
test(); // -> false

typeofit.isUint8ClampedArray( new Uint8ClampedArray() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isInt16Array">
          <div class="api-hd">
            <h2 class="api-title">isInt16Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isInt16Array ( val )</code>方法用来检测测试数据是否为 Int16Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Int16Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isInt16Array( numbers ); // -> false

function test(){
    typeofit.isInt16Array( arguments );
}
test(); // -> false

typeofit.isInt16Array( new Int16Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isUint16Array">
          <div class="api-hd">
            <h2 class="api-title">isUint16Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isUint16Array ( val )</code>方法用来检测测试数据是否为 Uint16Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Uint16Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isUint16Array( numbers ); // -> false

function test(){
    typeofit.isUint16Array( arguments );
}
test(); // -> false

typeofit.isUint16Array( new Uint16Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isInt32Array">
          <div class="api-hd">
            <h2 class="api-title">isInt32Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isInt32Array ( val )</code>方法用来检测测试数据是否为 Int32Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Int32Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isInt32Array( numbers ); // -> false

function test(){
    typeofit.isInt32Array( arguments );
}
test(); // -> false

typeofit.isInt32Array( new Int32Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isUint32Array">
          <div class="api-hd">
            <h2 class="api-title">isUint32Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isUint32Array ( val )</code>方法用来检测测试数据是否为 Uint32Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Uint32Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isUint32Array( numbers ); // -> false

function test(){
    typeofit.isUint32Array( arguments );
}
test(); // -> false

typeofit.isUint32Array( new Uint32Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isFloat32Array">
          <div class="api-hd">
            <h2 class="api-title">isFloat32Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isFloat32Array ( val )</code>方法用来检测测试数据是否为 Float32Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Float32Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isFloat32Array( numbers ); // -> false

function test(){
    typeofit.isFloat32Array( arguments );
}
test(); // -> false

typeofit.isFloat32Array( new Float32Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isFloat64Array">
          <div class="api-hd">
            <h2 class="api-title">isFloat64Array ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isFloat64Array ( val )</code>方法用来检测测试数据是否为 Float64Array 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Float64Array 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isFloat64Array( numbers ); // -> false

function test(){
    typeofit.isFloat64Array( arguments );
}
test(); // -> false

typeofit.isFloat64Array( new Float64Array() ); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isBase64">
          <div class="api-hd">
            <h2 class="api-title">isBase64 ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isBase64 ( val )</code>方法用来检测测试数据是否为一个基于 base64 编码的字符串。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 base64 编码的字符串返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isBase64('a2V5MT12YWx1ZTEma2V5Mj12YWx1ZTI'); // -> true
typeofit.isBase64('asdadf'); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isBlank">
          <div class="api-hd">
            <h2 class="api-title">isBlank ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isBlank ( val )</code>方法用来检测测试数据是否只包空格。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 只包含空格返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isBlank('  '); // -> true
typeofit.isBlank(new String()); // -> false
typeofit.isBlank(''); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isBoolean">
          <div class="api-hd">
            <h2 class="api-title">isBoolean ( obj )</h2>
          </div>
          <div class="api-bd">
            <p><code>isBoolean ( obj )</code>方法用来检测测试数据是否为 Boolean 类型</p>
            <p><strong>说明：</strong>在一些其它的 JavaScript 库中，例如<a href="https://github.com/jonschlinkert/kind-of" target="_blank">kind-of</a>中检测 Boolean 类型时，认为<code>new Boolean('')</code>也是一个布尔值，但我个人任务它应该是一个对象类型的值，而不应该是一个基础的 JavaScript 值类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">obj</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Boolean 类型则返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var projects;

typeofit.isBoolean(!!0); // -> true
typeofit.isBoolean(1); // -> false
typeofit.isBoolean(false); // -> true
typeofit.isBoolean(true); // -> true
typeofit.isBoolean(Boolean('1')); // -> true
typeofit.isBoolean(new Boolean('')); // -> false
typeofit.isBoolean(''); // -> false
typeofit.isBoolean(null); // -> false
typeofit.isBoolean(NaN); // -> false
typeofit.isBoolean(projects); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isConstructor">
          <div class="api-hd">
            <h2 class="api-title">isConstructor ( fn )</h2>
          </div>
          <div class="api-bd">
            <p><code>isConstructor ( fn )</code>方法用来检测测试函数是否为构造函数</p>
            <p>  ECMAScript 6+ distinguishes between callable (can be called without new) and constructable (can be called with new) functions:</p>
            <ul class="list">
              <li>Functions created via the arrow functions syntax or via a method definition in classes or object literals are not constructable.</li>
              <li>Functions created via the class syntax are not callable.</li>
              <li>Functions created in any other way (function expression/declaration, Function constructor) are callable and constructable.</li>
              <li>Built-in functions are not constructrable unless explicitly stated otherwise.</li>
            </ul>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">fn</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Function</dd>
            </dl>
            <p>必选，要测试的（构造）函数。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>fn 是构造函数返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var fn = function(){};
var ff = class {};
var f = () => console.log('no constructable');

typeofit.isConstructor(fn); // -> true
typeofit.isConstructor(ff); // -> true
typeofit.isConstructor(f); // -> false
typeofit.isConstructor(Math); // -> false
typeofit.isConstructor(Boolean); // -> true
typeofit.isConstructor(Array); // -> true
typeofit.isConstructor(Function); // -> true
typeofit.isConstructor(Date); // -> true
typeofit.isConstructor(RegExp); // -> true
typeofit.isConstructor(Object); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isDataView">
          <div class="api-hd">
            <h2 class="api-title">isDataView ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isDataView ( val )</code> 方法用来检测测试数据是否为 DataView 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 DataView 类型返回 true，否则返回 false</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var buffer = new ArrayBuffer(8);
var dv = new DataView(buffer);

typeofit.isDataView(buffer); // -> false
typeofit.isDataView(dv); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isDate">
          <div class="api-hd">
            <h2 class="api-title">isDate ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isDate ( val )</code>方法用来检测测试数据的数据类型是否为 Date 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 为 Date 类型返回 true，否则返回 false</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var time = new Date();

typeofit.isDate(time); // -> true
typeofit.isDate('2017-07-06'); // -> false
typeofit.isDate(time.getFullYear()); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isElement">
          <div class="api-hd">
            <h2 class="api-title">isElement ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isElement ( val )</code>方法用来检测测试数据的数据类型是否为 HTML 元素节点。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 为 HTML 元素节点返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var wrap = document.createElement('div');
var text = document.createTextNode('this is a text node.');

typeofit.isElement(wrap); // -> true
typeofit.isElement(text); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isEmpty">
          <div class="api-hd">
            <h2 class="api-title">isEmpty ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isEmpty ( val )</code>方法用来检测测试数据是否为空字符串。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是空字符串返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isEmpty(''); // -> true
typeofit.isEmpty(String()); // -> true
typeofit.isEmpty(new String()); // -> false
typeofit.isEmpty(' '); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isEmptyObject">
          <div class="api-hd">
            <h2 class="api-title">isEmptyObject ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isEmptyObject ( val )</code>方法用来检测测试数据是否为空（单体）对象。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是空对象返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>function Person(name,age){
   this.name = name;
   this.age = age;
}

typeofit.isEmptyObject({}); // -> true
typeofit.isEmptyObject([]); // true
typeofit.isEmptyObject(Person); // true
typeofit.isEmptyObject(new Object()); // true
typeofit.isEmptyObject(new Boolean()); // true
typeofit.isEmptyObject(new Function('alert(\'function\')')); // true
typeofit.isEmptyObject(new Array()); // true
typeofit.isEmptyObject(new Date('2017-12-11')); // true
typeofit.isEmptyObject(new RegExp('\s+','ig')); // true
typeofit.isEmptyObject(null); // true
typeofit.isEmptyObject(new String()); // true
typeofit.isEmptyObject(new String('string')); // false
typeofit.isEmptyObject({name:'robert'}); // -> false
typeofit.isEmptyObject(new Person('robert',30)); // false
typeofit.isEmptyObject(['']); // false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isError">
          <div class="api-hd">
            <h2 class="api-title">isError ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isError ( val )</code>方法用来检测测试数据是否为 Error 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Error 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isError({}); // -> false
typeofit.isError(new Error()); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isEven">
          <div class="api-hd">
            <h2 class="api-title">isEven ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isEven ( val )</code>方法用来检测测试数据的数据类型是否为偶数。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是偶数返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isEven(2); // -> true
typeofit.isEven(3); // -> false
typeofit.isEven(2.2); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isFloat">
          <div class="api-hd">
            <h2 class="api-title">isFloat ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isFloat ( val )</code>方法用来检测测试数据是否为浮点数。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是浮点数返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isFloat(2.4); // -> true
typeofit.isFloat(Number("3.4556645445E7")); // -> true
typeofit.isFloat(Number("3.4556645445E10")); // -> false
typeofit.isFloat(2); // -> false
typeofit.isFloat(0xffffff); // -> false
typeofit.isFloat(NaN); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isFunction">
          <div class="api-hd">
            <h2 class="api-title">isFunction ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isFunction ( val )</code>方法用来检测测试数据是否为 Function 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Function 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isFunction(function empty(){}); // -> true
typeofit.isFunction(parseInt); // -> true
typeofit.isFunction(Array); // -> true
typeofit.isFunction(Boolean); // -> true
typeofit.isFunction(Date); // -> true
typeofit.isFunction(Math); // -> false
typeofit.isFunction(Number); // -> true
typeofit.isFunction(Object); // -> true
typeofit.isFunction(RegExp); // -> true
typeofit.isFunction(String); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isHash">
          <div class="api-hd">
            <h2 class="api-title">isHash ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isHash ( val )</code>方法用来检测测试数据是否为普通对象（它是方法 [isPlainObject](https://yaohaixiao.github.io/typeofit/#isPlainObject) 的别名。）。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是普通对象返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isHash({}); // -> true
typeofit.isHash(Object.create(null)); // -> true
typeofit.isHash(function empty(){}); // -> false
typeofit.isHash([]); // -> false
typeofit.isHash(null); // -> false
typeofit.isHash(document.getElementById('wrap')); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isHex">
          <div class="api-hd">
            <h2 class="api-title">isHex ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isHex ( val )</code>方法用来检测测试数据是否为 16 进制编码的字符串。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 16 进制编码的字符串返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isHex('#ffffff')); // -> true
typeofit.isHex('f3f3f3')); // -> true
typeofit.isHex('#h1f1f1'); // -> false
typeofit.isHex('sdadfa'); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isHTMLCollection">
          <div class="api-hd">
            <h2 class="api-title">isHTMLCollection ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isHTMLCollection ( val )</code>方法用来检测数据的是否为 HTMLNodeList 对象。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 HTMLNodeList 对象返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isHTMLCollection(document.getElementById('isJSON')); // -> false
typeofit.isHTMLCollection(document.getElementsByTagName('li')); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isInfinite">
          <div class="api-hd">
            <h2 class="api-title">isInfinite ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isInfinite ( val )</code>方法用来检测测试数据的数据是正无穷或者负无穷。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是正无穷或者负无穷返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isInfinite(2.4); // -> false
typeofit.isInfinite(Infinity); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isInteger">
          <div class="api-hd">
            <h2 class="api-title">isInteger ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isInteger ( val )</code>方法用来检测测试数据是否为整数。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是整数返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isInteger(2.4); // -> false
typeofit.isInteger(2); // -> true
typeofit.isInteger(0xffffff); // -> true
typeofit.isInteger(NaN); // -> false
typeofit.isInteger(Number("3.4556645445E7"); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isJSON">
          <div class="api-hd">
            <h2 class="api-title">isJSON ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isJSON ( val )</code>方法用来检测测试数据是否为 JSON 格式字符串数据。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">obj</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 JSON 格式字符串数据返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isJSON("\"this is a JSON string.\""); // -> true
typeofit.isJSON("[\"1\",\"2\",3]"); // -> true
typeofit.isJSON("3"); // -> true
typeofit.isJSON("{\"prop\":\"JSON\"}"); // -> true
typeofit.isJSON({prop:'JSON'}); // -> false
typeofit.isJSON("{prop:'JSON'}"); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isMap">
          <div class="api-hd">
            <h2 class="api-title">isMap ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isMap ( val )</code>方法用来检测测试数据是否为 Map 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Map 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var map = new Map([
    ['name', 'Robert'],
    ['Gender', 'Male']
]);

typeofit.is(map) // -> 'map'

typeofit.isMap(map); // -> true
typeofit.isMap(['name','robert']) // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isNativeFunction">
          <div class="api-hd">
            <h2 class="api-title">isNativeFunction ( fn )</h2>
          </div>
          <div class="api-bd">
            <p><code>isNativeFunction ( fn )</code>方法用来检测测试函数是否为系统内置函数</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">fn</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Function</dd>
            </dl>
            <p>必选，要测试的（构造）函数。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>fn 是系统内置函数返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var fn = function(){};
var ff = class {};
var f = () => console.log('no constructable');

typeofit.isNativeFunction(fn); // -> false
typeofit.isNativeFunction(ff); // -> false
typeofit.isNativeFunction(f); // -> false
typeofit.isNativeFunction(alert); // -> true
typeofit.isNativeFunction(Boolean); // -> true
typeofit.isNativeFunction(Array); // -> true
typeofit.isNativeFunction(Function); // -> true
typeofit.isNativeFunction(Date); // -> true
typeofit.isNativeFunction(RegExp); // -> true
typeofit.isNativeFunction(Object); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isNull">
          <div class="api-hd">
            <h2 class="api-title">isNull ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isNull ( val )</code>方法用来检测测试数据是否为 null。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 为 null 返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var projects;
typeofit.isNull(null); // -> true
typeofit.isNull({}); // -> false
typeofit.isNull(projects); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isNumber">
          <div class="api-hd">
            <h2 class="api-title">isNumber ( obj )</h2>
          </div>
          <div class="api-bd">
            <p><code>isNumber ( obj )</code>方法用来检测测试数据是否为 Number 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">obj</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Number 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isNumber(2); // -> true
typeofit.isNumber(2.4); // -> true
typeofit.isNumber(0xffffff); // -> true
typeofit.isNumber(NaN); // -> true
typeofit.isNumber('33'); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isNumeric">
          <div class="api-hd">
            <h2 class="api-title">isNumeric ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isNumeric ( val )</code>方法用来检测测试数据是否是一个数字（只能是 number 类型或者 '123123' 这样的数字字符串）。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是一个数字返回 true，否则返回false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isNumeric(2); // -> true
typeofit.isNumeric(2.4); // -> true
typeofit.isNumeric(0xffffff); // -> true
typeofit.isNumeric('33'); // -> true
typeofit.isNumeric('0xffffff'); // -> true
typeofit.isNumeric(NaN); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isObject">
          <div class="api-hd">
            <h2 class="api-title">isObject ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isObject ( val )</code>方法用来检测测试数据是否为对象。使用 isObject() 方法测试单体对象和函数都返回值都是 true。</p>
            <p><strong>说明：</strong>在 Jon Schlinkert 的<a href="https://github.com/jonschlinkert/isobject">isobject</a> 项目中，认为函数类型不是 Object，不过我个人认为在 JavaScript 中函数（Function）是第一对象，所以我的 isObject() 方法
              中<code> typeofit.isObject(function empty(){});</code>记过返回 true，函数应该是对象（Object）。
            </p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 为对象返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>// True
typeofit.isObject(function empty(){}); // -> true
typeofit.isObject({}); // -> true
typeofit.isObject(Object.create(null)); // -> true
typeofit.isObject(Object.create({})); // -> true
typeofit.isObject(new Function()); // -> true

// False
typeofit.isObject([]); // -> false
typeofit.isObject(null); // -> false
typeofit.isObject(document.getElementById('wrap')); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isOdd">
          <div class="api-hd">
            <h2 class="api-title">isOdd ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isOdd ( val )</code>方法用来检测测试数据的数据类型是否为奇数。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是奇数返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isOdd(3); // -> true
typeofit.isOdd(2); // -> false
typeofit.isOdd(3.1); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isPlainObject">
          <div class="api-hd">
            <h2 class="api-title">isPlainObject ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isPlainObject ( val )</code>方法用来检测测试数据是否为普通对象。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是普通对象返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isPlainObject({}); // -> true
typeofit.isPlainObject(Object.create(null)); // -> true
typeofit.isPlainObject(function empty(){}); // -> false
typeofit.isPlainObject([]); // -> false
typeofit.isPlainObject(null); // -> false
typeofit.isPlainObject(document.getElementById('wrap')); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isRegExp">
          <div class="api-hd">
            <h2 class="api-title">isRegExp ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isRegExp ( val )</code>方法用来检测测试数据是否为正则表达式。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是正则表达式返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isRegExp(new RegExp('\s+','ig')); // -> true
typeofit.isRegExp(/\s+/ig); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isSet">
          <div class="api-hd">
            <h2 class="api-title">isSet ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isSet ( val )</code>方法用来检测测试数据是否为 isSet 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 isSet 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var mySet = new Set([1,2,3,4]);

typeofit.is(mySet) // -> 'set'

typeofit.isSet(mySet); // -> true
typeofit.isSet([1,2,3,4]) // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isString">
          <div class="api-hd">
            <h2 class="api-title">isString ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isString ( val )</code>方法用来检测测试数据是否为字符串。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">obj</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是字符串返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isString('string'); // -> true
typeofit.isString(String('string')); // -> true
typeofit.isString(new String('string')); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isSymbol">
          <div class="api-hd">
            <h2 class="api-title">isSymbol ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isSymbol ( val )</code>方法用来检测测试数据是否为 Symbol 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 Symbol 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var sym = Symbol('foo');
var symObj = Object(sym);

typeofit.is(sym) // -> 'symbol'
typeofit.isSymbol(sym); // -> true

typeofit.is(symObj) // -> 'object'
typeofit.isSymbol(symObj); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isTextNode">
          <div class="api-hd">
            <h2 class="api-title">isTextNode ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isTextNode ( val )</code>方法用来检测测试数据是否为文本节点。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是文本节点返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>typeofit.isTextNode(document.createElement('p')); // -> false
typeofit.isTextNode(document.createTextNode('p')); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isUndefined">
          <div class="api-hd">
            <h2 class="api-title">isUndefined ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isUndefined ( val )</code>方法用来检测测试数据是否 undefined（未定义）。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 undefined（未定义）返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var projects;

typeofit.isUndefined(projects); // -> true
typeofit.isUndefined([]); // -> false
typeofit.isUndefined(''); // -> false
typeofit.isUndefined(0); // -> false
typeofit.isUndefined(NaN); // -> false
typeofit.isUndefined({}); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isValue">
          <div class="api-hd">
            <h2 class="api-title">isValue ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isValue ( val )</code>方法用来检测测试数据是否为有效的数据。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是有效的数据返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var projects;

typeofit.isValue(projects); // -> false
typeofit.isValue(function empty(){}); // -> true
typeofit.isValue(/\s+/ig); // -> true
typeofit.isValue([]); // -> true
typeofit.isValue(''); // -> true
typeofit.isValue(0); // -> true
typeofit.isValue(NaN); // -> false
typeofit.isValue( null ); // -> false
typeofit.isValue({}); // -> true</code></pre>
          </div>
        </div>
        <div class="api-md" id="isWeakMap">
          <div class="api-hd">
            <h2 class="api-title">isWeakMap ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isWeakMap ( val )</code>方法用来检测测试数据是否为 WeakMap 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 WeakMap 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var map = new Map([
    ['name', 'Robert'],
    ['Gender', 'Male']
]);

var weakmap = new WeakMap({},'Robert');

typeofit.is(weakmap); // -> 'weakmap'

typeofit.isWeakMap(weakmap); // -> true
typeofit.isWeakMap(map); // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isWeakSet">
          <div class="api-hd">
            <h2 class="api-title">isWeakSet ( val )</h2>
          </div>
          <div class="api-bd">
            <p><code>isWeakSet ( val )</code>方法用来检测测试数据是否为 WeakSet 类型。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">val</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 是 WeakSet 类型返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>var weakset = new WeakSet([
    {'name': 'Robert'},
    window
]);

var set = new Set([1,2,3]);

typeofit.is(weakset) // -> 'weakset'

typeofit.isWeakSet(weakset); // -> true
typeofit.isWeakSet(set) // -> false</code></pre>
          </div>
        </div>
        <div class="api-md" id="isXML">
          <div class="api-hd">
            <h2 class="api-title">isXML ( obj )</h2>
          </div>
          <div class="api-bd">
            <p><code>isValue ( obj )</code>方法返回检测数据的是否为 XML 格式数据。</p>
            <h3 class="api-subject">Parameters</h3>
            <h4 class="api-param-name">obj</h4>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Any</dd>
            </dl>
            <p>必选，要检测的数据。</p>
            <h3 class="api-subject">Returns</h3>
            <dl class="api-param">
              <dt class="api-param-key">Type</dt>
              <dd class="api-param-value">Boolean</dd>
            </dl>
            <p>'val' 为 XML 返回 true，否则返回 false。</p>
          </div>
          <div class="api-ft">
            <h3 class="api-subject">Example</h3>
            <pre class="api-code"><code>const jsdom = require("jsdom");
const { JSDOM } = jsdom;
const DOMParser = require('xmldom').DOMParser;
const HTMLDOM = new JSDOM('&lt;html&gt;&lt;head&gt;&lt;title&gt;isXML&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;p&gt;p1&lt;/p&gt;&lt;p&gt;p2&lt;/p&gt;&lt;p&gt;p3&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;');
const XMLDOM = new DOMParser().parseFromString(
    '&lt;xml xmlns="a" xmlns:c="./lite"&gt;\n'+
        '\t&lt;child&gt;test&lt;/child&gt;\n'+
        '\t&lt;child&gt;&lt;/child&gt;\n'+
        '\t&lt;child/&gt;\n'+
    '&lt;/xml&gt;','text/xml');

typeofit.isXML(XMLDOM); // -> true
typeofit.isXML(HTMLDOM); // -> false</code></pre>
          </div>
        </div>
        <div class="footer" id="footer">
          <p>Copyright &copy;2017 <a href="https://github.com/yaohaixiao">Robert Yao</a>, all right reserved.</p>
          <p>
            Code licensed under<a href="http://opensource.org/licenses/mit-license.html">MIT License</a> · Documentation licensed under
            <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>
          </p>
          <p><a href="https://github.com/yaohaixiao/typeofit">View on GitHub</a> ·
            <a href="https://github.com/yaohaixiao/typeofit/issues">Issues</a>
          </p>
        </div>
      </div>
    </div>
  </body>
  <script type="text/javascript" src="js/typeofit.js"></script>
</html>